<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="../layout/base_resource.jsp" %>
<script type="text/javascript" src="${basePath}assets/js/iframe.js"></script>

<link rel="stylesheet" href="${basePath}assets/select2/css/select2.min.css" />
<script type="text/javascript" src="${basePath}assets/select2/js/select2.min.js"></script>
<script type="text/javascript" src="${basePath}assets/js/searching/custom_searching_page.js?<%=Math.random()%>"></script>


<div class="loc">
	<h3>自定义检索</h3>
	<ul class="loc_loc"><li> 当前位置：查询检索 > 自定义检索</li>
	</ul>
</div>
<div class="list_con_table" style="height: 800px;">
	 
   <div class="search_table">
   <input type="hidden" id="basePath" value="${basePath }"/>
   <form id="queryForm" style="width: 100%;">
   	<input type="hidden" name="currentPage" value="1"/>
   	<input type="hidden" id="queryCount" value="1"/>
    <div id="query_div" style="max-height: 256px;overflow-y: scroll;">
    <ul>
   <li class="Label_1" style="width: 9%;" >条件组合：&nbsp;</li>
	    <li class="Label_2" style="width: 10%;">
	    	
	    </li>
    <li class="Label_1" style="width: 9%;" >检索项：&nbsp;</li>
    <li class="Label_2" style="width: 20%;">
    	<select class="input_box js-example-basic-single" name="items[0].queryCode">
			<option value="">---请选择---</option>
			<c:forEach items="${queryObjs}" var="queryObj">
				<option value="${queryObj.code}">${queryObj.name}</option>
			</c:forEach>
			
		</select>
    </li>
    <li class="Label_1" style="width: 9%;" >检索条件：&nbsp;</li>
    <li class="Label_2" style="width: 15%;">
    	<select class="input_box" name="items[0].queryCondition">
			
			
		</select>
    </li>
    <li class="Label_1" style="width: 9%;" >检索值：&nbsp;</li>
    <li class="Label_2" style="width: 15%;">
    	<input class="input_box" name="items[0].queryValue" type="text" autocomplete="off"/>
    	<input name="items[0].queryCombination" type="hidden" value="AND"/>
    </li>
    <%-- <li class="Label_1" style="width: 9%;" >条件组合：&nbsp;</li>
    <li class="Label_2" style="width: 15%;">
    	<select class="input_box" name="items[0].queryCombination">
			<option value="AND">AND</option>
			<option value="OR">OR</option>
			
		</select>
    </li>
    <li class="Label_2" style="width: 4%;">
    	<span style="margin-top: 1px;"><img src="${basePath}assets/images/add.png"/></span>
    </li> --%>
    <li class="Label_2" style="width: 4%;">
    	<span style="margin-top: 7px;float: right;margin-right: 7px;"><img onclick="addQuery()" src="${basePath}assets/images/add.png"/></span>
    </li>
    
    </ul>
    </div>
    <ul>
    <li class="Label_5">
     <a id="queryBtn" onclick="queryBtnClick()">统计</a>
    </li>
    </ul>
    </form>
   </div>
<h5 align="center" id="export_h"></h5>
<table style="width:100%; float:left; border-collapse:collapse;" id="query_show_table">
      <thead>
	      <tr>
	      	  <td class="tdLabel_4">住院号</td>
		      <td class="tdLabel_4" hidden="hidden">病案号</td>
		      <td class="tdLabel_4" hidden="hidden">住院次数</td>
		      <td class="tdLabel_4">姓名</td>
		      <td class="tdLabel_4">身份证号</td>
		      <td class="tdLabel_4">出院科室</td>
		      <td class="tdLabel_4">出院日期</td>
		      <td class="tdLabel_4">离院方式</td>
		      <td class="tdLabel_4">住院天数</td>
		      <td class="tdLabel_4">总费用</td>
		      <td class="tdLabel_4">操作</td>
	      </tr>
      </thead>
      <tbody>
      	 <tr hidden="hidden" id="template_tr">
      	  <td class="tdLabel_5"><span class="only_id"></span></td>
	      <td class="tdLabel_5" hidden="hidden"><span class="mr_id"></span></td>
	      <td class="tdLabel_5" hidden="hidden"><span class="visit_number"></span></td>
	      <td class="tdLabel_5"><span class="patient_name"></span></td>
	      <td class="tdLabel_5"><span class="id_number"></span></td>
	      <td class="tdLabel_5"><span class="out_dept_name"></span></td>
	      <td class="tdLabel_5"><span class="out_hospital_date"></span></td>
	      <td class="tdLabel_5"><span class="str_out_hospital_type"></span></td>
	      <td class="tdLabel_5"><span class="in_hospital_day_number"></span></td>
	      <td class="tdLabel_5"><span class="total_cost_money"></span></td>
	      <td class="tdLabel_5">
	      	<a onclick="pageIndexShow(this)" title="首页">首页&nbsp;</a>
	      	<a onclick="pageIndexShow1(this)" title="首页新">首页新&nbsp;</a>
	      </td>
	     </tr>
      	
      </tbody>
     </table>
 <div id="pageList" class="pageList">
    <ul class="pagination clearfix" id="page_plus"></ul>
    <div class="pagination">
        <div>总共：<b id="totalPage">0</b> 条信息    当前页是第 <b id="currentPage">0/0</b>　页</div>
    </div>
</div>

  
    
</div>
<div hidden="hidden">
	
		<ul id="queryTemplate">
		<li class="Label_1" style="width: 9%;" >条件组合：&nbsp;</li>
	    <li class="Label_2" style="width: 10%;">
	    	<select class="input_box" name="items[0].queryCombination">
				<option value="AND">AND</option>
				<option value="OR">OR</option>
				
			</select>
	    </li>
			<li class="Label_1" style="width: 9%;" >检索项：&nbsp;</li>
    <li class="Label_2" style="width: 20%;">
    	<select class="input_box js-example-basic-single" style="width: 95%;" name="items[0].queryCode">
			<option value="">---请选择---</option>
			<c:forEach items="${queryObjs}" var="queryObj">
				<option value="${queryObj.code}">${queryObj.name}</option>
			</c:forEach>
			
		</select>
    </li>
    <li class="Label_1" style="width: 9%;" >检索条件：&nbsp;</li>
    <li class="Label_2" style="width: 15%;">
    	<select class="input_box" name="items[0].queryCondition">
			
		</select>
    </li>
    <li class="Label_1" style="width: 9%;" >检索值：&nbsp;</li>
    <li class="Label_2" style="width: 15%;">
    	<input class="input_box" name="items[0].queryValue" type="text" autocomplete="off"/>
    </li>
    
    <li class="Label_2" style="width: 4%;">
    	<span style="margin-top: 1px;"><img onclick="deleteQuery(this)" src="${basePath}assets/images/delete.png"/></span>
    </li>
		</ul>
		
	<input class="input_box" id="template_value" name="items[0].queryValue" type="text" autocomplete="off"/>
	</div>
